package com.api.impl;

import java.lang.reflect.Method;

import com.api.client.model.ApiMetadataHandler;
import com.api.client.model.ApiRequestFactory;
import com.api.client.model.ApiResultHandler;
import com.api.model.ApiRequestBuilder;

public class RequestBuilderFactory {

	private final ApiRequestFactory requestFactory;
	private final ApiMetadataHandler metadataHandler;
	private final ApiResultHandler apiResultHandler;

	public RequestBuilderFactory(ApiRequestFactory requestFactory, ApiMetadataHandler metadataHandler, ApiResultHandler apiResultHandler) {
		this.requestFactory = requestFactory;
		this.metadataHandler = metadataHandler;
		this.apiResultHandler = apiResultHandler;
	}

	public ApiRequestBuilder getRequestBuilder(Method method) {
		return new ApiRequestBuilderImpl(requestFactory, metadataHandler, apiResultHandler, method);
	}

}
